package cn.wolfcode.luowowo.article.domain;

import cn.wolfcode.luowowo.article.vo.CommunityAnswerVO;
import cn.wolfcode.luowowo.common.domain.BaseDomain;
import cn.wolfcode.luowowo.member.domain.UserInfo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 社区问答
 */
@Setter @Getter
public class Community  extends BaseDomain{

    //标题
    private String title;

    //发布问题的摘要
    private String summary;

    //发布问题的用户
    private UserInfo userInfo;

    //点赞数量
    private Integer thumbupnum;

    //回复数
    private Integer replynum;

    //浏览数
    private Integer viewnum;

    //发布问题的状态
    private int state;

    //创建时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
   @JsonFormat(pattern="yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date creatTime;

    //发布时间
    private Date releaseTime;

    //发布问题的内容
    private CommunityContent quesContent;

    //地点
    private Destination dest;

    //mogoDb的回复数据
    private CommunityAnswerVO answerVO;
}